package org.example.domain.strategy.model.entity;

import lombok.*;
import org.example.domain.strategy.model.vo.RuleLogicCheckTypeVO;

/**
 * 过滤信息及结果
 * @param <T>
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class RuleActionEntity <T extends RuleActionEntity.RaffleEntity>{
    private String code = RuleLogicCheckTypeVO.ALLOW.getCode();
    private String info = RuleLogicCheckTypeVO.ALLOW.getInfo();
    private String ruleModel;
    private T data;
    static public class RaffleEntity{

    }

    /**
     * 抽奖前过滤结果
     */
    @EqualsAndHashCode(callSuper = true)
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    static public class RaffleBeforeEntity extends RaffleEntity{
        /**
         * 策略ID
         */
        private Long StrategyId;
        /**
         * 黑名单：返回固定奖品
         */
        private Long awardId;
        /**
         * rule_weight：返回权重选择
         */
        private Long group;
    }

    /**
     * 抽奖中过滤结果
     */
    static public class RaffleCenterEntity extends RaffleEntity{


    }

    /**
     * 抽奖后过滤结果
     */
    static public class RaffleAfterEntity extends RaffleEntity{

    }
}
